package com.pubinfo.passbook.api.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhouch
 * @date 2021/11/16 15:07
 */
@Configuration
public class FilterConfiguration {
  
  @Bean
  public FilterRegistrationBean myFilter() {
    FilterRegistrationBean bean = new FilterRegistrationBean();
    bean.setFilter(new MyFilter());
    bean.addUrlPatterns("/*");
    bean.setOrder(-99);
    
    return bean;
  }
  
}
